<template>
  <div style="height:6vh;padding:10px 20px;background-color: #fff;">
    <span style="line-height:60px;font-size:20px;">围栏管理</span>
    <el-button type="primary" style="float:right;margin-top: 10px;"
               @click="router.push('/geofence')">返回</el-button>
  </div>
  <!-- 准备一个地图容器 -->
  <div id="mapContainer" style="width: 100%; height: 84vh">
  </div>
<!--  新建围栏弹窗-->
  <el-dialog title="新建围栏" v-model="dialogVisible" :before-close="handleClose">
    <el-form>
      <el-form-item label="围栏名称">
        <el-input v-model="geofence.name" placeholder="请输入围栏名称"></el-input>
      </el-form-item>
    </el-form>
    <template #footer>
      <el-button @click="handleClose">取消</el-button>
      <el-button type="primary" @click="saveGeofence">确定</el-button>
    </template>
  </el-dialog>
</template>
<script setup>
import router from "@/router";
import {nextTick, onMounted, ref} from "vue";
import { DrawScene, DrawControl,OperateEventType } from 'bmap-draw';
import {ElMessage} from "element-plus";
import qs from "qs";
import axios from "axios";

//定义用来控制弹窗的显示与隐藏
const dialogVisible = ref();
//定义对象用来保存围栏新增时给后端发送的数据
const geofence = ref()
// 定义全局变量map
var map;
//一进入地图立即加载页面
onMounted(()=>{})

//定义新增围栏方法
const saveGeofence = ()=>{

}

//处理弹窗关闭方法
const handleClose = () => {

};
//新增围栏

</script>


<style scoped>

</style>